<template>
	<view class="bgView">
		<mSearch :mode="2" button="outside" radius="5" @search="search($searchKey,2)"></mSearch>
		
		<view class="uni-list">
			<view class="uni-list-cell" v-for="(item,index) in list" :key="index" @click="gofeedback(index)">
				<view class="uni-list-cell-navigate uni-navigate-right" >
					<text>{{item.eventTitle}}</text>
					<text>{{item.eventTime}}</text>
					<text>{{item.eventType}}</text>
					<text>{{item.questionType}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import mSearch from "@/components/mehaotian-search/mehaotian-search.vue";
	
	export default {
		components:{
			mSearch
		},
		data() {
			return {
				list:[{eventTitle:"标题内容  污水处理问题",eventTime:"上报时间  2019-9-22 09:34",eventType:"任务类型  xx任务",questionType:"问题类型  紧急任务"},
				{eventTitle:"标题内容  污水处理问题",eventTime:"上报时间  2019-9-22 09:34",eventType:"任务类型  xx任务",questionType:"问题类型  紧急任务"},
				{eventTitle:"标题内容  污水处理问题",eventTime:"上报时间  2019-9-22 09:34",eventType:"任务类型  xx任务",questionType:"问题类型  紧急任务"},
				{eventTitle:"标题内容  污水处理问题",eventTime:"上报时间  2019-9-22 09:34",eventType:"任务类型  xx任务",questionType:"问题类型  紧急任务"},
				],
				reload: false
			};
		},
		onLoad() {
		    // this.getList();
		},
		onPullDownRefresh() {
		    this.reload = true;
		    this.last_id = "";
		    this.getList();
		},
		onReachBottom() {
		    this.getList();
			console.log("上拉加载");
			let	list = this.$data.list;
			this.$data.list =  this.$data.list.concat(list);
			  
		},
		methods:{
			getList() {
				this.reload = false;
				uni.stopPullDownRefresh();
			
				
				console.log("加载更多");
				},
				gofeedback(e){
					
				uni.navigateTo({
					url:"../reportFeedback/reportFeedback"
				})	
				},
			
		}
	}
</script>

<style>
	.bgView {
		width: 100%;
		height: 100%;
	}
	.uni-list-cell{
		margin: 30upx;
		border-radius: 10;
		box-shadow: 0 0 5upx 5upx #D9D9D9;
	}
.uni-list-cell-navigate{
	flex-direction: column;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
}
</style>
